<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-default/index.css">
		<link rel="stylesheet" type="text/css" href="AddIndustryStandard.css" />
	</head>

	<body>
		<script src="/javascripts/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		<script src="AddIndustryStandard.js" type="text/javascript" charset="utf-8"></script>
		<script src="/javascripts/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="//unpkg.com/element-ui/lib/index.js"></script>
		
		<div class="add_main">
			<div class="add_title">
				{{title_message}}
			</div>
		</div>
		<div id="app">
			<el-form ref="form" :model="form" label-width="80px" id="myform">
				<el-form-item label="标题" prop="title" :rules="[{ required: true, message: '标题不能为空'},{ maxlength: 100, message: '不能超出最大长度'}]">
					<el-input v-model="form.title" name="title"></el-input>
				</el-form-item>
				<el-form-item label="作者" prop="author" :rules="[{ required: true, message: '作者不能为空'},{ maxlength: 100, message: '不能超出最大长度'}]">
					<el-input v-model="form.author" name="author"></el-input>
				</el-form-item>
				<el-form-item label="来源" prop="source" :rules="[{ required: true, message: '来源不能为空'},{ maxlength: 100, message: '不能超出最大长度'}]">
					<el-input v-model="form.source" name="source"></el-input>
				</el-form-item>
				<el-form-item label="摘要" prop="summary" :rules="[{ required: true, message: '摘要不能为空'},{ maxlength: 200, message: '不能超出最大长度'}]">
					<el-input type="textarea" v-model="form.summary" name="summary"></el-input>
				</el-form-item>
				<el-form-item label="正文" prop="content" :rules="[{ required: true, message: '正文不能为空'},{ maxlength: 8000, message: '不能超出最大长度'}]">
					<el-input type="textarea" v-model="form.content" name="content"></el-input>
				</el-form-item>
					<el-upload  v-if="isnew==1 || fileList[0].url == ''"  action="/upload" type="drag" :multiple="false" :thumbnail-mode="true" :on-remove="handleRemove" :on-preview="handlePreview" :on-success="upload" accept="'image/pjpeg','image/jpeg','image/png','image/x-png'" :default-file-list="fileList">
						<i class="el-icon-upload"></i>
						<div class="el-dragger__text">将文件拖到此处，或<em>点击上传</em></div>
						<div class="el-upload__tip" slot="tip">只能上传jpg/png文件，且不超过500kb</div>
					</el-upload>
					<el-upload  v-else action="/upload" type="drag" :multiple="false" :thumbnail-mode="true" :on-remove="handleRemove" :on-preview="handlePreview" :on-success="upload" accept="'image/pjpeg','image/jpeg','image/png','image/x-png'" >
						<i class="el-icon-upload"></i>
						<div class="el-dragger__text">将文件拖到此处，或<em>点击上传</em></div>
						<div class="el-upload__tip" slot="tip">只能上传jpg/png文件，且不超过500kb</div>
					</el-upload>
					<el-dialog v-model="Previewdata">
						<img v-bind:src="fileList[0].url" class="pic"/>
					</el-dialog>
					<el-form-item label="">
						<el-input type="hidden" v-model="form.imgUrl" name="imgUrl" id="imgUrl"></el-input>
					</el-form-item>
				<el-button type="primary" id="confirm" @click="ConfirmForm('form')">确认</el-button>
				<el-button type="primary" id="cancle" @click="Cancle">取消</el-button>
			</el-form>
		</div>
	</body>

</html>